﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace BPM.Web.Shared.Data;

/// <summary>
/// 角色菜单表
/// </summary>
[DisplayName("角色菜单表")]
public class SysRoleMenu : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 角色Id
    /// </summary>
    [DisplayName("角色Id")]
    public long SysRoleId { get; set; }

    /// <summary>
    /// 一对一引用（系统用户）
    /// </summary>
    public SysRole SysRole { get; set; } = new();

    /// <summary>
    /// 菜单Id
    /// </summary>
    [DisplayName("菜单Id")]
    public long SysMenuId { get; set; }

    /// <summary>
    /// 一对一引用（系统菜单）
    /// </summary>
    public SysMenu SysMenu { get; set; } = new();
}
